home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
9-Digit Zip Code Directory
/
9-Digit Zip Code Directory (American Business Information) (ABIZIP-12).ISO
/
z4src.zip
/
Z4Z4KEY.C
< prev
next >
Wrap
C/C++ Source or Header
|
1993-08-12
|
2KB
|
73 lines
//----------------------------------------------------------------------------
// MODULE DESCRIPTION
//
// Module: z4z4key.c
// Title: ZIP+4 Engine
// Notice: John M. Weeder
// Copyright (c) 1993. All rights reserved.
// This module contains proprietary information and should be
// treated as confidential.
//
//----------------------------------------------------------------------------
// MAINTENANCE HISTORY
//
// $Workfile$
// $Revision$
// $Author$
// $Date$
// $Log$
//
//----------------------------------------------------------------------------
// MODULE NARRATIVE
//
//
// This module contains build a key for a ZIP+4 record.
// Currently the key consists of the finance number, the first character of
// the primary name (excluding leading zeros) and the numeric portion of
// the primary number encoded in BCD.
// Key length is 3 + 1 + 5 = 9
//
// The code in this module should be written entirely in C.
// Do not use any C++ constructs.
//
// This module is portable to:
// DOS 3.X+
// MS Windows 3.X+
// OS/2 2.X+
// OS/2 2.0 PM
// SCO UNIX.
//
// The following compilers are supported:
// MSC 6.0A
// MSC/C++ 7.0
// Borland C++ 3.1 for DOS
// Borland C++ 1.0 for OS/2 2.X
// SCO UNIX cc
//
//----------------------------------------------------------------------------
#include <z4.h>
//----------------------------------------------------------------------------
// Description:
// Parameters:
// Returns:
//----------------------------------------------------------------------------
VOID FN_E Z4Z4Key(PBYTE pb, PCSZ pcszPof, PCSZ pszPriName, PCSZ pszPriNo)
{
if (pcszPof == NULL) // Set default parameters
pcszPof = "";
if (pszPriName == NULL)
pszPriName = "";
if (pszPriNo == NULL)
pszPriNo = "";
stra2b(pb, MAX_FINANCE_BCD, pcszPof, strlen(pcszPof));
Metaphone(pszPriName, pb + MAX_FINANCE_BCD, 3);
AlNumKey(pszPriNo, pb + MAX_FINANCE_BCD + 3, 3);
return ;
}
//----------------------------------------------------------------------------
//------------------------------- End of File --------------------------------
//----------------------------------------------------------------------------